<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>殴飞商品小类同步信息</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon" />
<#include "../template/include/assign.ftl">
<#include "../template/include/source.ftl">
<#include "../template/template_listPage.ftl">
    <link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .page{
            float:right;
            padding-top: 15px;
            margin-right: 15px;
        }
    </style>
    <script type="text/javascript">
        $().ready( function() {

            var $validateErrorContainer = $("#validateErrorContainer");
            var $validateErrorLabelContainer = $("#validateErrorContainer ul");
            var $validateForm = $("#inputForm");
            var $tab = $("#tab");

            // Tab效果
            $tab.tabs(".tabContent", {
                tabs: "input"
            });

            // 表单验证
            $validateForm.validate({
                errorContainer: $validateErrorContainer,
                errorLabelContainer: $validateErrorLabelContainer,
                wrapper: "li",
                errorClass: "validateError",
                ignoreTitle: true,
                rules: {
                    "ohFlyUserInfo.userid": {
                        required: true
                    },
                    "ohFlyUserInfo.userpws": {
                        required: true
                    },
                    "ohFlyUserInfo.cardid": {
                        required: true
                    }
                },
                messages: {
                    "ohFlyUserInfo.userid": {
                        required: "请输入用户账号！"
                    },
                    "ohFlyUserInfo.userpws": {
                        required: "请输入用户密码！"
                    },
                    "ohFlyUserInfo.cardid": {
                        required: "请选择需查询商品的编码！"
                    }
                },
                submitHandler: function(form) {
                    $(form).find(":submit").attr("disabled", true);
                    form.submit();
                }
            });

            $('#searchButton').click(
                    function () {
                        $('#currentPage_listForm').val('1');
                    }
            );
            $('#cardid').val('<#if ohFlyUserInfo??>${(ohFlyUserInfo.cardid)!}</#if>');
            $('#isAudit').val('<#if ohFlyQuery??>${(ohFlyQuery.isAudit)!}</#if>');

        <#if actionErrors?? && (actionErrors?size > 0)>
            <#--$.messager.show("提示信息", "<#list errorMessages as list>${list}<br></#list>",2000);-->
            <#--ymPrompt.alert({title:'提示信息',message:'<#list errorMessages as list>${list}<br></#list>'});-->
            $.dialog({type: "warn", content: "<#list errorMessages as list>${list}<br></#list>",
                modal: true, autoCloseTime: 3000});
        </#if>
        });
    </script>
</head>
<body class="list">
<div class="body">
    <div class="listBar">
        <h1><span class="icon">&nbsp;</span>殴飞小类商品信息同步管理&nbsp;<span class="pageInfo"></span></h1>
    </div>
    <div style="display: none;" id="validateErrorContainer" class="validateErrorContainer">
        <div class="validateErrorTitle">以下信息填写有误,请重新填写</div>
        <ul></ul>
    </div>
    <form id="inputForm" class="validate" action="${web_base}/game/ohfly_brand_sync!sync.htm" method="post">
    <div class="operateBar">
        <label>用户信息：</label>
        <#--用户账号：<input type="text" name="ohFlyUserInfo.userid"  value="<#if ohFlyUserInfo??>${(ohFlyUserInfo.userid)!}</#if>" />-->
        <#--用户密码：<input type="password" name="ohFlyUserInfo.userpws"  value="" />-->
        用户账号：<select name="ohFlyUserInfo.userid" class="formText {required: true}">
                    <option value="" selected="selected">请选择...</option>
                    <#if users?? && (users?size gt 0)>
                        <#list users as user>
                            <option value="${user.userid!}">
                            ${user.userid!}
                            </option>
                        </#list>
                    </#if>
                    </select>
        需查询商品的编码：<select name="ohFlyUserInfo.cardid" id="cardid" >
        <option value="" selected="selected">请选择...</option>
        <option value="21" >
            游戏卡密
        </option>
        <option value="22" >
            游戏直充
        </option>
    </select>
        <input type="submit" id="addButton" class="addButton" value="同步" />
    </div>
   </form>
<@pageList page=(page!) id="listForm" action="${web_base}/game/ohfly_brand_sync!list.htm" query="ohFlyBrandQuery" isEmpty=true>
    <div class="operateBar">
        <label>查找:</label>
        大类商品编码：&nbsp;&nbsp;<input type="text" name="ohFlyBrandQuery.classid"  value="<#if ohFlyBrandQuery??>${(ohFlyBrandQuery.classid)!}</#if>" />
        小类商品编码：<input type="text" name="ohFlyBrandQuery.cardid"  value="<#if ohFlyBrandQuery??>${(ohFlyBrandQuery.cardid)!}</#if>" />
        小类商品名称：<input type="text" name="ohFlyBrandQuery.cardname"  value="<#if ohFlyBrandQuery??>${(ohFlyBrandQuery.cardname)!}</#if>" />
        <input type="submit" id="searchButton" class="searchButton" value="" />
    </div>
    <table class="listTable">
        <tr>
            <th>
                <span class="sort" name="classid">大类商品编码</span>
            </th>
            <th>
                <span class="sort" name="cardid">小类商品编码</span>
            </th>
            <th>
                <span class="sort" name="cardname">小类商品名称</span>
            </th>
            <th>
                <span class="sort" name="operateTime">记录操作时间</span>
            </th>
            <#--<th>-->
                <#--<span class="sort" name="detail">商品介绍</span>-->
            <#--</th>-->
            <#--<th>-->
                <#--<span class="sort" name="compty">资费说明</span>-->
            <#--</th>-->
            <#--<th>-->
                <#--<span class="sort" name="useCity">开通城市</span>-->
            <#--</th>-->
            <#--<th>-->
                <#--<span class="sort" name="useMethod">使用方法</span>-->
            <#--</th>-->
            <#--<th>-->
                <#--<span class="sort" name="fullCostsite">充值网址</span>-->
            <#--</th>-->
            <#--<th>-->
                <#--<span class="sort" name="proare">产品产地</span>-->
            <#--</th>-->
            <#--<th>-->
                <#--<span class="sort" name="serviceNum">客服服务中心</span>-->
            <#--</th>-->
            <#--<th width="60">操&nbsp;作<th/>-->
        </tr>
    <#if page?? && page.list?? && (page.list?size gt 0)>
        <#list page.list as obj>
            <tr>
                <td>
                     ${(obj.classid)!}
                </td>
                <td>
                     ${(obj.cardid)!}
                </td>
                <td>
                    <#if obj.cardname?? && obj.cardname?length gte 30>
                    <#--//截取输出文字的长度-->
                    ${obj.cardname?substring(0,30)}...
                    <#else>
                    ${(obj.cardname)!}
                    </#if>
                </td>
                <td>
                    ${(obj.operateTime)!}
                </td>
                <#--<td>-->
                <#--${(obj.detail)!}-->
                <#--</td>-->
                <#--<td>-->
                     <#--${(obj.compty)!}-->
                <#--</td>-->
                <#--<td>-->
                      <#--${(obj.useCity)!}-->
                <#--</td>-->
                <#--<td>-->
                     <#--${(obj.useMethod)!}-->
                <#--</td>-->
                <#--<td>-->
                     <#--${(obj.fullCostsite)!}-->
                <#--</td>-->
                <#--<td>-->
                     <#--${(obj.proare)!}-->
                <#--</td>-->
                <#--<td>-->
                     <#--${(obj.serviceNum)!}-->
                <#--</td>-->
                <#--<td width="60">-->
                    <#--<a href="${web_base}/game/oh_fly!detail.htm?goodsId=${(obj.cardId)!}" title="详情">[详情]</a>-->
                <#--</td>-->
            </tr>
        </#list>
    </#if>
    </table>

    <#if page?? && page.list?? && (page.list?size <= 0)>
        <div class="noRecord">
            没有找到任何记录!
        </div>
    </#if>
</@pageList>
</div>

</body>
</html>